package com.boyon;

import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.jdbc.XADataSourceAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.web.EmbeddedServletContainerAutoConfiguration;

import com.boyon.common.exection.SystemException;
import com.boyon.common.start.LoadPropertiesType;
import com.boyon.common.start.StartupConfig;

/**
 * ClassName:ApplicationStart <br/>
 * Function: 系统启动类. <br/>
 * Date: 2018年3月13日 下午3:13:54 <br/>
 * 
 * @author sunshulin
 * @version
 * @since JDK 1.8
 * @see
 */
@SpringBootApplication(exclude = { DataSourceAutoConfiguration.class,
		MongoAutoConfiguration.class, XADataSourceAutoConfiguration.class,
		EmbeddedServletContainerAutoConfiguration.class })
public class ApplicationStart {

	/**
	 * main:主函数启动方法. <br/>
	 * 
	 * @author sunshulin
	 * @param args
	 * @since JDK 1.8
	 */
	public static void main(String[] args) {
		StartupConfig startupConfig = new StartupConfig();
		try {
			startupConfig.start(ApplicationStart.class,
					LoadPropertiesType.classpath);
		} catch (Exception e) {
			throw SystemException.builder(0, e);
		}
	}

}
